# wow_menu v1.02 # Allows you to display categories as a menu tree of list elements, and to apply a custom order to all items as well as hiding tree elements or displaying just a part of the tree, giving you full menu control. No hacks/mods required. # Bjoern Schwenzer, Andrei Zinca # http://www.shadowplanet.com/ # ...................................................................... # This is a plugin for Textpattern - http://textpattern.com/ # To install: textpattern > admin > plugins # Paste the following text into the 'Install plugin' box: # ...................................................................... YTo5OntzOjQ6Im5hbWUiO3M6ODoid293X21lbnUiO3M6NzoidmVyc2lvbiI7czo0OiIxLjAy IjtzOjY6ImF1dGhvciI7czozMDoiQmpvZXJuIFNjaHdlbnplciwgQW5kcmVpIFppbmNhIjtz OjEwOiJhdXRob3JfdXJpIjtzOjI4OiJodHRwOi8vd3d3LnNoYWRvd3BsYW5ldC5jb20vIjtz OjExOiJkZXNjcmlwdGlvbiI7czoyMzE6IkFsbG93cyB5b3UgdG8gZGlzcGxheSBjYXRlZ29y aWVzIGFzIGEgbWVudSB0cmVlIG9mIGxpc3QgZWxlbWVudHMsIGFuZCB0byBhcHBseSBhIGN1 c3RvbSBvcmRlciB0byBhbGwgaXRlbXMgYXMgd2VsbCBhcyBoaWRpbmcgdHJlZSBlbGVtZW50 cyBvciBkaXNwbGF5aW5nIGp1c3QgYSBwYXJ0IG9mIHRoZSB0cmVlLCBnaXZpbmcgeW91IGZ1 bGwgbWVudSBjb250cm9sLiBObyBoYWNrcy9tb2RzIHJlcXVpcmVkLiI7czo0OiJ0eXBlIjtp OjE7czo0OiJoZWxwIjtzOjEyOTM2OiIKPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KIHRkIHsg dmVydGljYWwtYWxpZ246dG9wOyB9CiBjb2RlIHsgY29sb3I6IzAwOTsgZm9udC13ZWlnaHQ6 Ym9sZDsgfQo8L3N0eWxlPgoKPGgxPjxiPndvd19NZW51IC0gZGVzY3JpcHRpb248L2I+PC9o MT4KPHA+VGhlIHdvd19tZW51IHBsdWdpbiBnaXZlcyB5b3UgY29tcGxldGUgY29udHJvbCBv dmVyIHlvdXIg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ICAgICAgJHNuYW1lID0gZG9TbGFzaCgkaXRlbVsnbmFtZSddKTsKICAgICAgICAgICAg ICAgICAgICAgICAgJGFydGljbGVfY291bnQgPSBzYWZlX2NvdW50KCd0ZXh0cGF0dGVybics CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAi KCAoQ2F0ZWdvcnkxID0gJyRzbmFtZScpIE9SICIgLgogICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIihDYXRlZ29yeTIgPSAnJHNuYW1lJykg KSBBTkQgU3RhdHVzID0gNCIpOwoJCSAgICAgICAgaWYgKCRhcnRpY2xlX2NvdW50KSB7CgkJ CQkvLyBJZiBzaG93Y291bnQgaXMgZW5hYmxlZCBBTkQgaWYgd2UgaGF2ZSBhcnRpY2xlcyBp biB0aGlzIGl0ZW0gdGhlbiBzaG93IGNvdW50IChsb2NhbGl6ZWQpCgkJCQkJaWYoJHNob3dj b3VudCA9PSAxKSAkY291bnQgPSAnICgnIC4gJGFydGljbGVfY291bnQgLiAnICcgLiAoJGFy dGljbGVfY291bnQgPiAxIHx8ICRhcnRpY2xlX2NvdW50ID09IDAgPyBnVHh0KCdhcnRpY2xl cycpIDogZ1R4dCgnYXJ0aWNsZScpKSAuICcpJzsKCQkJCQlpZigkc2hvd2NvdW50ID09IDIp ICRjb3VudCA9ICcgKCcgLiAkYXJ0aWNsZV9jb3VudCAuICcpJzsKCQkJfQoJCQllbHNlICRj b3VudCA9ICIiOwoJCX0KCi8vIEFoIC0gZmluYWxseSwgdGhlIG91dHB1dCBvZiB0aGUgZWxl bWVudCEKCiAgICAgICAgaWYgKGluX2FycmF5KCRpdGVtWyduYW1lJ10sICRzZWN0aW9uX25h bWVzKSkgJGhyZWYgPSBidWlsZGhyZWYoInMiLCAkaXRlbVsnbmFtZSddLCAoJGl0ZW1bJ3Rp dGxlJ10uJGNvdW50KSwgJHNhbCk7CiAgICAgICAgZWxzZSAk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