Useragent Info in Comments

06 Jun 2011
10:58

put your commenter's useragent information with their comments


For a while, now, PivotX has stored a useragent string with a vistor's comment, but has done nothing with it. This hook extension reads that information and, via different new parameters added to the [[ comments ]] tag, displays information about that commenter's useragent with their comment.

Current Version Information
  • Extension Version: 2.1
  • Release Date: 2012-01-02
  • Translation Routine Version: 20220813.1954
  • Useragents DB Version: 20200404.0906
Download
  • uaincomments.zip - this file is a complete archive containing all of the up-to-date components for the extension.
  • Unpack the file, and place the /uaincomments directory in your ~/pivotx/extensions directory. Then, navigate to the Extensions tab of your PivotX to enable it and configure it.
  • translateua.inc - the translation routine that the extension uses; it can be updated independently of the extension as a whole.
  • Replace the translateua.inc file in your ~/pivotx/extensions/uaincomments directory with this one.
  • useragents.db - the database of useragents.
  • Replace the useragents.db file in your ~pivotx/extensions/uaincomments directory with this one.
  • pics.zip - archive containing all of the useragent images that can be used by the extension.
  • Unpack the file and replace the /pics directory in your ~/pivotx/extensions/uaincomments directory with this one.
Snippet Syntax

This extensions adds more parameters to the [[ comments ]] tag in your templates, and parses them as follows:

  • %useragent% - replaced simply with the commenter's useragent string
  • %os% - replaced by an image representing the commenter's operating system
  • %ostext% - replaced by the name of the commenter's operating system
  • %oslink% - replaced by the url of the commenter's operating system's web page
  • %browser% - replaced by an image representing the commenter's browser (this includes the version of the browser given in the img tag's title parameter)
  • %browsertext% - replaced by the name of the commenter's browser (this includes the version of the browser in parentheses following the name)
  • %browserlink% - replaced by the url of the commenter's browser's web page
  • %browser-engine% - replaced by an image representing whether the commenter's browser is Gecko-based or Webkit-based (shows nothing if it is neither)
  • %browser-enginetext% - replaced by a phrase indicating Gecko- or Webkit-based browser use on the part of a commenter (or nothing if the browser is neither)
Themes

This extension is theme-enabled. Go to this page for more information.

Help Gather Information

Go to this entry to see a demonstration.

Go to this page to see a list of supported useragents. If yours is not listed (if it comes up as unknown), there are instructions there on how to submit your information so that it can be included in future updates.

Changelog
  • version 1.0 released on 6 June 2011
  • version 1.1 released on 16 June 2011
    • extension will now remotely access the translation routine if remote resources are selected
    • can now supply a user-defined image for unknown operating systems/browsers
    • will now revert to local resources if remote resources are selected but unreachable
    • bug fix: ...paths...
  • version 2.0 released on 1 July 2011
    • added support for the detection of three other browser layout engines (KHTML, Presto, and Trident/Tasman), also changing the text displayed for the other two already supported (WebKit and Gecko)
    • changed %gecko-webkit% to %browser-engine% and %gecko-webkit-text% to %browser-enginetext%; the previous parameters are now replaced with nothing (deprecated)
    • cleaned up some html code/used heredocs (took me long enough)
    • added support for themes
    • added support for required versions of the component files (translateua.inc and useragents.db)
    • bug fix: replacing %path% for layout engine image
  • version 2.1 released on 2 January 2012
    • cross references local useragent images (even in themes) with those required by useragents.db to show images you may be missing (displays nothing if there are no missing images)
    • bug fix: html oversight in resource comparison display and message
    • bug fix: component version check while using remote resources gives false fail
    • bug fix: undefined browser type returns "<" if remote resources are used


Powered by PivotX - 2.3.10 Gravatars: Globally Recognized Avatars XML: RSS Feed XML: Atom Feed
Valid XHTML 1.0 Transitional Valid CSS 2.1
© MMX Möbius HTML Design Möbius HTML Design
Möbius Hosting Services Möbius Hosting Services