Dropdown pagenames

Using the (:title:) in dropdowns

This was a glaring omission!

However, the below code fragment in BBuildGroupList should rectify the problem:

$cleanPage = preg_replace('/[()]/', '', $page);
$title = FmtPageName('$Title', $cleanPage);

$out .= '<li>';
$out .= MakeLink($page, $page, $title);
$out .= '</li>';

I would think I shouldn't have to take so many steps.
There's a good likelihood I'm missing something.
Or, it could be that the $page variable has a funky format due to something else in the dropdown code.

I don't have good screenshots of this in action, since here all the blog-posts are dumped into the same dropdown.
On another (non-public) website I have them sub-divided into months, but the non-ISO format of the page-names means that BlogCal ignores them (that's another item on my long-term TODO list).

With this update, I could revert the page-name formatting back to an ISO date-standard.
It would obviate the fix for now -- but I would like something like BlogCal to use any arbitrary page - and use some other sort of marker for inclusion.

So I'll think about it....

DONE: commit the update to git
DONE: update it here, as well

Federated Search

Federated search of PmWiki and WordPress

I want to be able to search both my wiki(s) and my blog(s).
That is - a federated search.

Here are some notes for myself, mainly.




Using SharePoint FederatedSearch with WordPRess - from 2012. Might have some jumping-off points.

Auto-associating .js files with Node

It's not impossible

If you don't have aregistry entry under Applications as below, then you can use ftype:

ftype JSFile=C:\Program Files\nodejs\node.exe "%1"%*

I made use of the notes here, and then got it to work by trial-and-error, resulting in the following Data value:

"C:\Program Files\nodejs\node.exe" "%1"%*

NOTE: the %* value is NOT in quotes, and has no space between it and previous double-quote.

Without this, the parameters either did not get passed along, or came in with an extra space, and were ignored.

Syntax Highlighting

Alternate syntax highlighters

I've been using Geshi for... years.

I was reading an article today, and particularly liked the look of its inline code:

Turns out it's the default theme of Prism.

I found a few other resources in the meantime if I want to poke around:


Emacs and whatnot

Default browser from emacs

Let's say that you're at work, and a number of work-related web-apps just work better in Internet Explorer* so you've made it the default browser.

But you want to open up files from within Emacs inside of Firefox, not IE.

So, how d'ye do it?

(setq browse-url-browser-function #'browse-url-firefox)

That seems to do the trick.

* sigh

System-default browser from emacs, anyway

UPDATE: Tuesday, September 8, 2015

So, let's say you want most browser-destined items in Emacs to open in the non-default browser, and you've redefined the Emacs browser, as above.

How do you open certain URLs in the system default browser (because a number of work-related web-apps just work better only work in Internet Explorer*)?

Use open-path-external -- this will trip the system's default handler for the protocol (http:// in this case).

(open-path-external "http://enterprise.app.that.only.works.in/internet.explorer.jsp"

Yeah, that's right. We're a Windows shop, using a Java application that only works in IE.



dev grind

The other night I ported some node code to a small web-page.
I showed it off the next day to a friend, and after I hit SEND I though... why are the commit dates from 5 months ago?

I had re-invented my own wheel.

Re-ported it.

Anyway. It meant I was working on the project again, so that's good. I added all the new things I had introduced into the original project, and pushed it over to github.io, finally, as well: http://michaelpaulukonis.github.io/mispelr/

Linting the code for the browser. ("Helloooo, EsLint!"). Cleaning it up. Adding some functionality.

TODO: unit-testing the browser-based JS.

I haven't done this consistently.

I've unit-tested Node, but not the browser, outside of one-off code chunks for a few things.

So. High time I take care of this.

I've used vows in the past, but will try working with Mocha



sample html-harness

This is pretty much based on the the one in this tutorial, but with some more annotations, and the mocha and chai dependencies pulled from a cdn instead of being local in the repo.

<!DOCTYPE html>
  <meta charset="utf-8">
  <title>mispelr tests</title>
  <link href="https://cdn.rawgit.com/mochajs/mocha/2.2.5/mocha.css" rel="stylesheet" />
  <div id="mocha"><p><a href=".">Index</a></p></div>
  <div id="messages"></div>
  <div id="fixtures"></div>

  <!-- test framework -->
  <script src="https://cdn.rawgit.com/mochajs/mocha/2.2.5/mocha.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/chai/3.2.0/chai.js"></script>

  <!-- scripts under test -->
  <script src="../js/maledict.js"></script>
  <script src="../js/lexer.js"></script>
  <script src="../js/mispel.js"></script>
  <!-- end scripts-under-test -->


  <!-- test scripts -->
  <script src="mispelr_test.js"></script>

  <!-- end test scripts -->




returning to esLint

I know I should be linting, but I just have been... lazy?

Yeah, lazy.

So, I've gotten back to working with eslint - the configurable, pluggable linter for JavaScript.

Here's the .eslintrc that I'm using at the moment, having fiddled with it only briefly.
I'm working with node.js for utilities, not deployment, so console statement are okay.

    "rules": {
        "indent": [
        "quotes": [
        "linebreak-style": [
        "semi": [
        "no-console": 0
    "env": {
        "node": true
    "extends": "eslint:recommended"

Or, do it via prompts with eslint --init

TODO: Now for the big question - can I integrate eslint into VisualStudio ?!!?

TagCloud and Markdown

Initial implementation of TagCloud

GitHub repo @ https://github.com/MichaelPaulukonis/pmwiki-list-categories

(:listcategories sized .*:)

Addons Admin Ajax Attachments BlogIt Blogging Bootstrap Bootstrapmenu Bots Browsers Build CSS Chrome CleanUrls Cmd CommandLine Configuration CoreCandidate Dates Development Editing Emacs Farms Forms Gists Git GitHub Github Goats GoogleNews Gui HTML Heroku IIS Icons Images JavaScript Javascript Jingo LameExcuses Linting Linux Markdown Markup NLP NaNoGenMo NewsForGoats NodeJS NodeJs Npm PHP PageLists PageTOC Pagelists Pagetoc Php55 PmWiki PmWikiKit PmwikiKit PostGres PowerShell Psql Python SQL ScrewTurnWiki Search SentimentAnalysis SetUp Shell Sidebar Skin Skins SourceBlock Sourceblock Spam Tags Themes ToDo Twitter UnitTesting Uploads Utilities Web Weirdness Wiki Windows Windows10 WishList Word-2013 Word2020 WordPress WorstPractices

(:listcategories simple .* :)

In case things change, as of now, the output above looked like this initially:

Then this, after using the SDV configs, above:

integration into sidebar

(:div class="list-cat nav nav-list":)
(:listcategories sized .* :)

uses the following css that was added to bootstrap-fluid\css\pmwiki.css

UPDATE: nope, not sure what this is for. The code doesn't label-anything. So, what this does, I don't remember.

What could I have been doing? Some other experiment?

div.list-cat .label {
        margin-right: 4px;
        margin-bottom: 2px;
        padding-bottom: 0px;
        float: left;

config.php integration

SDV($ListCategories_SizedlistNum, 100); // average number of item in the SizedList format
SDV($ListCategories_SortSizedList, true); // sort tags in the tag cloud alphabetically?
SDV($ListCategories_SortSimpleList, true); // sort tags in the simple list alphabetically?

Markdown conflict

NOTE: I had to disable Markdown links in order for this to work. :::sigh:::

TODO: figure out the Markdown bug.

website enhancements

Taking care of Business

I've got a long list of TODOs and projects that should be taken care of!

Not the least is imlementing things that I've done on a non-publicly-accessible PmWiki site that could/should be replicated here (not nesc. part of the 'kit).

Such as:

Login Form

See notes and examples @ Blog.2014-08-22

Tag Cloud

Tag-cloud via Cookbook:ListCategories
Nice li'l tag-cloud. Added to BlogIt sidebar; then to main sidebar.

NOTE: original code has been modifed to use tag-group variable.

TODO: what on earth did I change? woo-hoo!

Site Information

View-only info at SiteAdmin.Information

The version I'm using here has been heavily rewritten.
TODO: should be added to version control.

Bootstrap Dropdowns

Dropdown rework

My current dropdown code always has a sub-dropdown.
This is great when there is more than one group in a dropdown.

This is... not so greatAWFUL when there is only a single group in the dropdown.

Attach:mandatory.subgroup.png Δ


I want to have code output this:

<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown">Bootstrap<b class="caret">
  <ul class="dropdown-menu">
      <a class="wikilink" href="/Bootstrap/Bootstrap">Bootstrap</a>
      <a class="wikilink" href="/Bootstrap/EditForm">EditForm</a>
      <a class="wikilink" href="/Bootstrap/EditQuickReference">EditQuickReference</a>
      <a class="wikilink" href="/Bootstrap/LocalTemplates">LocalTemplates</a>
      <a class="wikilink" href="/Bootstrap/Markup">Markup</a>
      <a class="wikilink" href="/Bootstrap/Sandbox">Sandbox</a>
      <a class="wikilink" href="/Bootstrap/StyleOptions">StyleOptions</a>

Done (not implemented here)

Nor has this been committed to github.

No markup changes are required.
Existing markup that generates dropdown menus will produce a single dropdown (no sub-menu) when one group is present:

Attach:single.dropdown.png Δ

Existing markup that generates dropdown menus will produce a dropdown with sub-menus when more than one group is present:

Attach:double.dropdown.png Δ

Done (implemented here)