# Name: cnk_section_tree v0.3.10 # Type: Admin/Client side plugin # Section Tree # Author: Christian Nowak # URL: http://www.cnowak.de # Recommended load order: 1 # ..................................................................... # This is a plugin for Textpattern - http://textpattern.com/ # To install: textpattern > admin > plugins # Paste the following text into the 'Install plugin' box: # ..................................................................... YToxMDp7czo0OiJuYW1lIjtzOjE2OiJjbmtfc2VjdGlvbl90cmVlIjtzOjY6ImF1dGhvciI7 czoxNToiQ2hyaXN0aWFuIE5vd2FrIjtzOjEwOiJhdXRob3JfdXJpIjtzOjIwOiJodHRwOi8v d3d3LmNub3dhay5kZSI7czo3OiJ2ZXJzaW9uIjtzOjY6IjAuMy4xMCI7czoxMToiZGVzY3Jp cHRpb24iO3M6MTI6IlNlY3Rpb24gVHJlZSI7czo0OiJjb2RlIjtzOjMzMzM1OiINCmRlZmlu ZSgnQ05LX1JFV1JJVEVfU0VDVElPTl9EUk9QRE9XTicsIHRydWUpOw0KDQovLw0KLy8gRE8g Tk9UIENIQU5HRSBBTllUSElORyBCRUxPVyBUSElTIExJTkUNCi8vDQppZihAdHhwaW50ZXJm YWNlID09ICdhZG1pbicpIA0Kew0KCS8qDQoJMSA9PiBnVHh0KCdwdWJsaXNoZXInKSwNCgky ID0+IGdUeHQoJ21hbmFnaW5nX2VkaXRvcicpLA0KCTMgPT4gZ1R4dCgnY29weV9lZGl0b3In KSwNCgk0ID0+IGdUeHQoJ3N0YWZmX3dyaXRlcicpLA0KCTUgPT4gZ1R4dCgnZnJlZWxhbmNl cicpLA0KCTYgPT4gZ1R4dCgnZGVzaWduZXInKSwNCgkwID0+IGdUeHQoJ25vbmUnKQ0KCSov DQoNCglhZGRfcHJpdnMoJ2Nua19zZWN0aW9uX3RyZWUnLCcxLDInKTsNCglyZWdpc3Rlcl90 YWIoJ2V4dGVuc2lvbnMnLCAnY25rX3NlY3Rpb25fdHJlZScsICJzZWN0aW9uIHRyZWUiKTsN CglyZWdpc3Rlcl9jYWxsYmFjaygnY25rX3NlY3Rpb25fdHJl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