Category ‘Internal’
Back to Google
Since I switched back to my domain neverpanic.de, which I lost about a year ago to a domain grabber (you can check out archive.org for my site), I’ve been waiting for Google to start indexing my site again. Unfortunately, it seemed I was out of luck - even half a year after domain registration I still didn’t have any pages in the Google index.
I recently discovered a possibility to have your site reissued if you think it has been banned from the index: Google offers a request reconsideration form in their Google Webmaster Tools service. Five days after I sent in the request with an explanation what happened to the domain before it seems Google is starting to list my site again.
Evidence is quite obvious… here are two graphs from Google Webmaster Tools, the first one showing the number of pages crawled daily and the second one the amount of crawled data in KB
Keeping yourself out of your Google Analytics statistics
Using Google Analytics and wondered how many clicks you add to your site(s) on your own? Here’s an old way to keep yourself out updated for the new Google Analytics JavaScript.
Based on Count me out on Analytics Talk I’m keeping myself out of my sites’ statistics. However Google released a new version of their tracking JavaScript in December and they’re no longer adding new features to the old urchin.js. So updating is a god idea, but I still want to keep my hits out of my site statistics.
A quick glance at the Google Analytics help center told me there was a way to set custom variables in the new JavaScript, too, so I modified my keep-me-out files:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-XXXXXXX-X"); pageTracker._initData(); pageTracker._trackPageview(); </script> <script type="text/javascript"> function setSegment(next) { pageTracker._setVar('someSpecialTextYoullUseInACustomFilterInGoogleAnalytics'); if (next.length > 0) { document.location.href = next; } else { window.close(); } } </script> </head> <body onload="setSegment('http://location.of/the.same.script.on.another.site.of.yours.to.redirect')"> </body> </html>
So what is this doing? First, it loads the Google Analytics JavaScript (lines 5-8), then it initializes the tracking (lines 9-13) and last but not least the function (lines 14-23) that sets the custom value in the tracking class and redirects if you passed another URL to it (useful for chaining all your sites). Finally in line 25, the function gets called on page load.
Combined with “dom.allow_scripts_to_close_windows” in Firefox’ about:config you can add this page as a new start page tab and have it exclude you automagically every time you press the home button (and the window closes automatically after this, which keeps your tab bar clean).
GeSHify: a GeSHi syntax highlighting extension for Expression Engine
I recently wanted to post some source code on this Expression Engine-powered blog - I thought about some syntax highlighting to improve readability. However, after asking Google and the Expression Engine forums search it turned out there had been several attempts to integrate a syntax highlighter into Expression Engine, but these plugins or extensions were either outdated or not available anymore. *sigh*
Update: GeSHify has moved! Visit it's new home http://geshify.com/. This page is probably outdated!
So I figured out it would end as it always does (notice how I exaggerate here to keep the pathos of the text) - I had to do it my way. And here it is: GeSHify for Expression Engine.
GeSHify supports the following features:
- Customizable intelligent caching (this one is very important, since GeSHi is not the fastest code highlighter out there)
- Supports GeSHi 1.0 and GeSHi 1.1 (currently alpha) - and you can even switch between both using some clicks in the control panel
- Customizable tag (in case you want to keep the original functionality of [ code ] instead of overwriting it, which is the default setting)
- HTML-argument-style settings: you can pass something like lang=actionscript to the code tag
- Default settings manageable using the control panel, so you don't have to pass all arguments each time you're pasting code
Want to see an example? Sure, no problem:
<?php function activate_extension() { global $DB; $DB->query($DB->insert_string('exp_extensions', 'extension_id' => '', 'class' => 'Geshify', 'method' => 'pre_typography', 'hook' => 'typography_parse_type_start', 'priority' => 8, 'version' => $DB->escape_str($this->version), 'enabled' => 'y' ) )); $DB->query($DB->insert_string('exp_extensions', 'extension_id' => '', 'class' => 'Geshify', 'method' => 'post_typography', 'hook' => 'typography_parse_type_end', 'priority' => 8, 'version' => $DB->escape_str($this->version), 'enabled' => 'y' ) )); } ?>
If you know PHP and the Expression Engine API you might notice this is the place where the extension hooks into Expression Engine. If you don't you probably don't care either
Read on for Documentation and Download