Another Neat Trick or Hack
NOTE... If you are using PivotX version 2.2.6 or later, this hack is now easier than ever to use, because it is now an extension (that works only with PivotX version 2.2.6 or later). In fact, the results you see in the comments below are now being handled by the extension. You can get more information on it here.
NOTE... As this can now be found in extension format, the hack will no longer be updated or supported.
I have hacked another part of pivot. This time, when you comment to any of these entries, you send your browser's useragent information along with your comment. This information tells whatever site you're visiting what OS you're using, what version of an OS, what web browser you're using, what version that browser is, and any add-ons to either the OS or browser.
So, I then take that information and parse it so that when you comment, two little icons appear next to your name showing your OS and browser. Try it out!
- The Pivot Forums: that link is to a topic regarding this hack for Pivot 1.x. It includes a how-to.
- The PivotX Forums: coming soon, a link to a topic regarding this hack for PivotX 2.x. In that topic is included a how-to.
- useragent.tar.gz: this file contains everything you need to make the changes to your Pivot 1.x blog, including images, a file with some php codes, and a step-by-step set of instructions for implementing this hack. It is actually quite easy to do.
- useragentx.tar.gz: this file contains everything you need to make the changes to your PivotX 2.x blog, including images, a file with some php codes, and a step-by-step set of instructions for implementing this hack. It is very easy to do (easier than for Pivot 1.x).
- This is a list of supported OSes and browsers. If you don't see yours on there, drop me a line (just like it says on that page).
Below is a list of dates and what was edited.
- Current Version Info:
for Pivot 1.x - 20091023.0902 (this is the last version for Pivot; the hack for Pivot is no longer being updated)
for PivotX 2.x - 20110120.0850
- 25 October 2005: Updated with more OSes and browsers.
- 26 January 2006: Added support for SeaMonkey and Flock.
- 20 February 2006: Added support for Sylera.
- 23 February 2006: Added an image and routines for unknown or unspecified OSes and browsers. Hacked more files so that edited comments will still include useragent information.
- 3 March 2006: Hmmm, somehow, I never wrote routines to detect Ubuntu and Debian Linux, even though I said they were supported. Now, they are.
- 12 October 2006: Correctly identifies Epiphany
- 15 October 2006: Correctly identifies Galeon
- 12 December 2006: Added support for IE7 (which seems to be a turning point in IE). Added some new graphics.
- 20 December 2006: Added support for Kubuntu Linux, BeOS/Zeta-OS, iCab, and Shiira. Updated the image for Minimo. Reworked some PHP code for smoother operation.
- 24 December 2006: In anticipation of people getting these things for Christmas, I've added support for the PlayStation 3 and Nintendo Wii. Also, after more research, I've discovered and confirmed that the browser used on the PSP and PS3 is a Sony-branded version of Netfront. So, I reconfigured things to reflect that.
- 2 June 2008: I've added the Nintendo DS (can it and the Wii actually surf anywhere beside where Nintendo lets them?), updated some images, and rewrote the function that translates the useragent in order to streamline it a little; it also makes adding new OSes and browsers MUCH easier.
- 23 October 2009: It's been well over a year since the last update. I've added a ton of linux distributions, so they should no longer come up as "Unspecified Linux". I've updated support for Windows 7 and IE8. I've added support for Google's Chrome browser. I've updated some images. I've also updated the README file to better support editing of comments so that it keep the correct useragent (it used to revert to that of the comment editor as opposed to the comment poster).
As always, check the link above for the supported OSes and browsers. If you find an OS or browser in the "Planned Support" column, there isn't officially support for it in this hack.
- 29 October 2009: hacked PivotX. Now it will display useragent information just like the old Pivot.
- 18 January 2011: Only for PivotX, I've rewritten the .inc file, it should be a little faster. With it comes support for Android, iPhone, iPad, and Fennec. So, if you are updating, you only need to upload the .inc file and the images for those four items. I don't think I've updated any other images.
- 20 January 2011: Added several browsers—Arora, Comodo Dragon, IceApe, Pale Moon, and Prism—and an "OS"—BlackBerry. Though not yet implemented in any fashion, the routine will now specify WebKit browsers (includes a webkit.png image). Updated the images for Blazer (browser) and K-Meleon (browser). The routine will now display the version of the browser, for most browsers (hover over the browser image in any of the comments below to see). So, upload the .inc file and the images for the browsers/OSes mentioned to upgrade, or upload everything.
- 20 January 2011 (a second update): Made some further changes to the routine in the .inc file so that more information can be displayed, as follow:
- %os% - still displays a 14x14 image representing the operating system of the commenter, just as before
- %oslink% - will be replaced with the url to the web page of the commenter's operating system (e.g., if the commenter is using Windows 7, "%oslink%" will be replaced with "http://www.windows.com/"; you still have to supply the anchor tags)
- %ostext% - will be replaced simply with a textual representation of the commenter's operating system (e.g., will simply display "Windows 7")
- %browser% - still displays a 14x14 image representing the browser of the commenter, just as before
- %browserlink% - will be replaced with the url to the web page of the commenter's browser (e.g., if the commenter is using Firefox, "%browserlink%" will be replaced with "http://www.mozilla.com/"; you still have to supply the anchor tags)
- %browsertext% - will be replaced simply with a textual representation of the commenter's browser, with the version number, if available (e.g., will simply display "Firefox (3.6)")
- %gecko-webkit% - will display a 14x14 image representing whether the commenter's browser is Gecko-based or WebKit.
- %gecko-webkit-text% - will be replaced simply with a textual statement indicating that the commenter's browser is Gecko-based or WebKit (e.g., for Firefox, it would show "a Gecko-based browser")