# Name: soo_multidoc_admin v0.1.3 # Type: Admin only plugin # Administer Multidoc collections # Author: Jeff Soo # URL: http://ipsedixit.net/ # Recommended load order: 5 # ..................................................................... # This is a plugin for Textpattern - http://textpattern.com/ # To install: textpattern > admin > plugins # Paste the following text into the 'Install plugin' box: # ..................................................................... YToxMTp7czo0OiJuYW1lIjtzOjE4OiJzb29fbXVsdGlkb2NfYWRtaW4iO3M6NjoiYXV0aG9y IjtzOjg6IkplZmYgU29vIjtzOjEwOiJhdXRob3JfdXJpIjtzOjIxOiJodHRwOi8vaXBzZWRp eGl0Lm5ldC8iO3M6NzoidmVyc2lvbiI7czo1OiIwLjEuMyI7czoxMToiZGVzY3JpcHRpb24i O3M6MzE6IkFkbWluaXN0ZXIgTXVsdGlkb2MgY29sbGVjdGlvbnMiO3M6NDoiaGVscCI7czo5 NTc2OiI8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgpkaXYjc2VkX2hlbHAgcHJlIHtwYWRkaW5n OiAwLjVlbSAxZW07IGJhY2tncm91bmQ6ICNlZWU7IGJvcmRlcjogMXB4IGRhc2hlZCAjY2Nj O30KZGl2I3NlZF9oZWxwIGgxLCBkaXYjc2VkX2hlbHAgaDIsIGRpdiNzZWRfaGVscCBoMywg ZGl2I3NlZF9oZWxwIGgzIGNvZGUge2ZvbnQtZmFtaWx5OiBzYW5zLXNlcmlmOyBmb250LXdl aWdodDogYm9sZDt9CmRpdiNzZWRfaGVscCBoMSwgZGl2I3NlZF9oZWxwIGgyLCBkaXYjc2Vk X2hlbHAgaDMge21hcmdpbi1sZWZ0OiAtMWVtO30KZGl2I3NlZF9oZWxwIGgyLCBkaXYjc2Vk X2hlbHAgaDMge21hcmdpbi10b3A6IDJlbTt9CmRpdiNzZWRfaGVscCBoMSB7Zm9udC1zaXpl OiAyLjRlbTt9CmRpdiNzZWRfaGVscCBoMiB7Zm9udC1zaXplOiAxLjhlbTt9CmRpdiNzZWRf aGVscCBoMyB7Zm9udC1zaXplOiAxLjRlbTt9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